ChangeListener
getName()
and getValue()
Assume that you named a slider using setName()
.
The name of the slider is a string that
is stored as part of its data.
To ask the slider for its name use:
String getName()
To get the value of the slider use
int getValue()
This returns a value between the minimum and maximum value of the slider.
Here is part of a program that has two sliders and a text field for each. Fill in the blanks so that when a slider changes its value the value is written it the correct text field.